const getWindowSize = () => {
  let innerWidth = -1,
    innerHeight = -1;
  if (window.innerWidth) {
    innerWidth = window.innerWidth;
  } else if (document.body && document.body.clientWidth) {
    innerWidth = document.body.clientWidth;
  }
  if (window.innerHeight) {
    innerHeight = window.innerHeight;
  } else if (document.body && document.body.clientHeight) {
    innerHeight = document.body.clientHeight;
  }

  return {
    innerWidth,
    innerHeight
  };
};

export default getWindowSize;
